﻿@inject IStringLocalizer<InputGroupsMultiple> Localizer
@inject IStringLocalizer<Foo> LocalizerFoo

<div>
    <BootstrapInputGroup>
        <BootstrapInputGroupLabel DisplayText="@Localizer["InputGroupsMultipleDistance"]" />
        <BootstrapInput @bind-Value="@BindValue" />
        <BootstrapInputGroupLabel DisplayText="km" />
    </BootstrapInputGroup>
    <BootstrapInputGroup class="mt-2">
        <BootstrapInput @bind-Value="@BindValue" />
        <BootstrapInputGroupLabel DisplayText="@StringAt" />
        <BootstrapInput @bind-Value="@StringMailServer" />
        <Button Icon="fa-solid fa-print" IsOutline="true"></Button>
        <Button Icon="fa-solid fa-magnifying-glass" IsOutline="true"></Button>
    </BootstrapInputGroup>
</div>

@code {
    /// <summary>
    /// Foo 类为Demo测试用，如有需要请自行下载源码查阅
    /// Foo class is used for Demo test, please download the source code if necessary
    /// https://gitee.com/LongbowEnterprise/BootstrapBlazor/blob/main/src/BootstrapBlazor.Shared/Data/Foo.cs
    /// </summary>
    [NotNull]
    private Foo? Model { get; set; }

    private string BindValue { get; set; } = string.Empty;

    private string StringAt { get; set; } = "@";

    private string StringMailServer { get; set; } = "163.com";

    /// <summary>
    /// OnInitialized 方法
    /// </summary>
    protected override void OnInitialized()
    {
        Model = Foo.Generate(LocalizerFoo);
    }
}
